package com.titanrise.crm.domain.model;

import com.titanrise.crm.domain.model.enums.MessageStatus;
import com.titanrise.crm.environment.annotation.TableColumn;
import com.titanrise.crm.environment.annotation.TableID;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Description:
 * @Author: pront
 * @Time:2024-11-21 12:22
 */
@Data
@Builder
@AllArgsConstructor
public class Messages {

    /**
     * 消息id
     */
    @TableID("message_id")
    private String messageId;

    /**
     * 发送者id
     */
    @TableColumn("sender_id")
    private String senderId;

    /**
     * 接收者id
     */
    @TableColumn("receiver_id")
    private String receiverId;

    /**
     * 消息内容
     */
    @TableColumn("content")
    private String content;

    /**
     * 消息状态 READ已读 | UNREAD未读
     */
    @TableColumn("status")
    private MessageStatus status;

    /**
     * 创建时间
     */
    @TableColumn("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableColumn("update_time")
    private LocalDateTime updateTime;

    /**
     * 读取时间
     */
    @TableColumn("read_time")
    private LocalDateTime readTime;
}
